package modelLayer;
import java.util.ArrayList;


/**
 * Write a description of class CustomerContainer here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class CustomerContainer{
    private ArrayList<Customer> customers;
    private static CustomerContainer instance;
    //Constructor for CustomerContainer
    private CustomerContainer(){
        customers = new ArrayList<Customer>();
    }
    //Singleton for CustomerContainer, to create CustomerContainer only once
    public static CustomerContainer getInstance(){
        if(instance == null){
            instance = new CustomerContainer();
            
        }
        return instance;
    }
    //Adds customer and regular customer to ArrayList of customers
    public void addCustomer(Customer customer){
        customers.add(customer);
    }
    //Returns ArrayList of customers
    public ArrayList<Customer> getAllCustomers(){
        return customers;
    }
}